import {SMSMODE} from "@/types/SMSMODE.ts";

export type RandomImage = {
    image: string;
    key: string;
}

export type LoginSubmitType = {
    username: string;
    password: string;
    captcha: string
    checkKey: string
}

export type LoginPhoneSubmitType = {
    phone: string;
    code: string;
}

export type LoginCode = {
   phone: string;
   smsMode: SMSMODE;
}

export type LoginSubmitResponseUserType = {
    "id": string
    "username": string
    "realname": string
    "avatar": string
    "birthday": string
    "sex": null,
    "email": string
    "phone": string
    "status": number,
    "delFlag": number,
    "createBy": string,
    "createTime": string,
    "updateBy": string,
    "updateTime": string
}

export type LoginSubmitResponsePermissionTreeDTOListType = {
    "id": string
    "parentId": string
    "name": string
    "url": string
    "component": string
    "isRoute": boolean,
    "componentName": string,
    "menuType": number,
    "perms": string,
    "permsType": string
    "alwaysShow": boolean
    "icon": string
    "isLeaf": boolean,
    "hidden": boolean,
    "hideTab": boolean,
    "description": string,
    "internalOrExternal": boolean | number,
    "sortNo": number,
    childrenType: number
    status: string
    "children": LoginSubmitResponsePermissionTreeDTOListType[] | null
}

export type LoginSubmitResponseType = {
    token: string;
    user: LoginSubmitResponseUserType
    permissionTreeVOList: LoginSubmitResponsePermissionTreeDTOListType[]
    defaultRouter: string,
    roleId: string
    roleCode: string
}


// 专家登录
export type ExpertLoginBodyType = {
    name: string
    pwd: string
}
// 专家登录
export type ExpertLoginType = {
    trueName: string; // 用户真实姓名
    role: string; // 用户角色，根据需求添加更多角色
    teacherId: string; // 教师 ID
    groupId: string; // 组 ID
    token: string; // JWT Token
    moduleId: string
}